package com.medical.controller;

import com.medical.pojo.Warning;
import com.medical.service.WarningService;
import com.medical.vo.Rmed;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("warning")
public class WarningController {

    @Autowired
    private WarningService warningService;

    @RequestMapping("/findAll")
    public List<Warning> findAll(){
        return warningService.findAll();
    }

    @RequestMapping("/updateStatus")
    public Rmed updateStatus(Integer id){
        return warningService.updateStatus(id);
    }
}
